﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Security;


namespace ProjectEF6
{
    public class DLL
    {


        // Login Start
        public String TestLogin(string username, string password)
        {
            if (Membership.ValidateUser(username, password))
            {
                return "Succes";

            }
            else
            {
                return "Error";
            }
        } // Login Stop

        //Start GetRole

        public String GetUserRole(string username)
        {
            if (Roles.GetRolesForUser(username).Contains("admin"))
            {
                return "admin";
            }
            else
            {
                return "user";
            }
        }

        //Stop GetRole

    }
}
